package com.ruoyi.mes.service;

import java.util.List;

import com.github.pagehelper.PageInfo;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.mes.domain.BuyNeed;
import com.ruoyi.mes.vo.buy.BuyOrderVo;
import com.ruoyi.mes.vo.buy.BuyNeedVo;
import com.ruoyi.mes.vo.list.BuyNeedListVo;

/**
 * 采购需求Service接口
 *
 * @author LongAndHao
 * @date 2023-04-04
 */
public interface IBuyNeedService
{
    /**
     * 查询采购需求
     *
     * @param needId 采购需求主键
     * @return 采购需求
     */
    public BuyNeed selectBuyNeedByNeedId(Long needId);

    /**
     * 查询采购需求列表
     *
     * @param buyNeed 采购需求
     * @return 采购需求集合
     */
    public List<BuyNeed> selectBuyNeedList(BuyNeed buyNeed);

    /**
     * 新增采购需求
     *
     * @param buyNeed 采购需求
     * @return 结果
     */
    public int insertBuyNeed(BuyNeed buyNeed);

    /**
     * 修改采购需求
     *
     * @param buyNeed 采购需求
     * @return 结果
     */
    public int updateBuyNeed(BuyNeed buyNeed);

    /**
     * 批量删除采购需求
     *
     * @param needIds 需要删除的采购需求主键集合
     * @return 结果
     */
    public int deleteBuyNeedByNeedIds(Long[] needIds);

    /**
     * 删除采购需求信息
     *
     * @param needId 采购需求主键
     * @return 结果
     */
    public int deleteBuyNeedByNeedId(Long needId);

    /**
     * 查 - 采购需求分页 - 采购需求单号
     * @param buyNeed
     * @return
     */
    List<BuyNeedListVo> buyNeedList(BuyNeed buyNeed);

    /**
     * 查 - 采购需求详情
     * @param id 采购需求id
     * @return
     */
    BuyNeedVo getDetais(Long id);

    /**
     * 删 - 采购需求
     * @param id
     * @return
     */
    AjaxResult deleteBuyNeed(Long id);

    /**
     * 生成采购订单
     * @param buyOrderVo
     * @return
     */
    AjaxResult createBuyorder(BuyOrderVo buyOrderVo);
}
